/*
 * Created on 2004-12-21
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package nc.tb.app;

import java.io.Serializable;

import nc.tb.cube.DimVector;
import nc.tb.cube.SheetDef;
import nc.tb.dim.DimMember;
import nc.tb.pub.exception.NtbRException;
import nc.tb.pub.util.NtbLogger;

/**
 * @author tzj
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PlanArgument implements Serializable,Cloneable {
	private SheetDef sheetDef;
	private DimVector dimVector;
    /**
     * 
     */
    public PlanArgument() {
        super();
        // TODO Auto-generated constructor stub
    }
    public PlanArgument(DimVector dv) {
        super();
        this.dimVector=dv;
        // TODO Auto-generated constructor stub
    }
	/**
	 * @return Returns the dimVector.
	 */
	public DimVector getDimVector() {
		return dimVector;
	}
	/**
	 * @return Returns the sheetDef.
	 */
	public SheetDef getSheetDef() {
		return sheetDef;
	}
	/**
	 * @param dimVector The dimVector to set.
	 */
	public void setDimVector(DimVector dimVector) {
		this.dimVector = dimVector;
	}
	/**
	 * @param sheetDef The sheetDef to set.
	 */
	void setSheetDef(SheetDef sheetDef) {
		this.sheetDef = sheetDef;
	}
	public DimMember[] getDimMembers(){
	    return dimVector.getDimMembers();
	}
	public Object clone(){
		try{
			PlanArgument pa=(PlanArgument)super.clone();
			pa.dimVector=(DimVector)getDimVector().clone();
			return pa;
		}catch(CloneNotSupportedException e){
			NtbLogger.error(e);
			throw new NtbRException("CloneNotSuppported.");
		}
	}
	
}
